<?php
function logfile($str)
{
    $timestr = '[' . date("Y-m-d H:i:s") . ']';
    file_put_contents('log.txt', $timestr . "\n" . $str . "\n\n", FILE_APPEND);
}
